package com.example.demo.Service;


import com.example.demo.Entity.OperationLog;
import com.example.demo.Entity.User;

import java.util.List;
import java.util.Map;
import java.util.Optional;

public interface OperationLogService {

    // 创建一个新的 OperationLog
    OperationLog createOperationLog(OperationLog operationLog);

    // 通过 ID 获取 OperationLog
    Optional<OperationLog> getOperationLogById(Long id);

    // 获取所有的 OperationLog
    Map<String,Object> getAllOperationLogs();

    //通过用户名获取该用户的所有操作记录
    Map<String,Object> searchLogByUserName(User user);

    // 更新 OperationLog
    OperationLog updateOperationLog(Long id, OperationLog operationLog);

    // 通过 ID 删除 OperationLog
    boolean deleteOperationLog(Long id);
}

